package com.woniuxy.education.mapper;

import com.woniuxy.education.entity.Allschool;
import com.woniuxy.education.entity.GradeDean;
import com.woniuxy.education.entity.School_Contrast;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


public interface SchoolMasterMapper {

    //查询本校的升学数据
    @Select("select c.id,c.all_num,c.entrance_num,c.`year`,c.sid,s.school_name " +
            "from school_contrast as c,all_school as s,`user` as u " +
            "where u.id=s.uid and c.sid=s.id and u.id=#{id}")
    public   List<School_Contrast> findSchoolContrast(int userid);

    //查年级主任
    @Select("select g.id,g.grade,g.uid,g.sid,u.`name` " +
            "from grade_dean as g left join `user` as u on g.uid=u.id " +
            "left join all_school as s on g.sid=s.id")
    public List<GradeDean> findGradeDean();

    //预计升学率
    @Select("select * from `2021`")
    public  School_Contrast findContrast();

}
